﻿using System.Collections.Generic;
using System.ServiceModel;
using Sinacor.Infra.Service.Security.Services;
using Sinacor.Infra.Common.Exceptions.FaultContracts;
using Sinacor.Infra.Common.Exceptions;
using Sinacor.Infra.Service.ExceptionHandling;

namespace Sinacor.Servico.Bovespa.ManutencaoOrdens.Service.ServiceContract
{
    [ExceptionShielding]
    [ServiceContract(Namespace = "http://www.bovespa.com.br/Sinacor.Servico.Bovespa.ManutencaoOrdens.Service.ServiceContract", SessionMode = SessionMode.Allowed, Name = "IManutencaoOrdens")]
    public interface IManutencaoOrdens
    {

        [FaultContract(typeof(BusinessFault))]
        [FaultContract(typeof(ValidationFault))]
        [FaultContract(typeof(GeneralFault))]
        [FaultContract(typeof(InvalidSessionFault))]
        [FaultContract(typeof(LicensingFault))]
        [FaultContract(typeof(AccessIsDeniedFault))]
        [OperationLog]
        [OperationContract(IsTerminating = false, IsInitiating = true, IsOneWay = false, Action = "ConsultarDetalhesOrdem")]
        List<DataContract.Response.DetalheOrdemResponse> ConsultarDetalhesOrdem(DataContract.Request.ChaveOrdemRequest request);

        [FaultContract(typeof(BusinessFault))]
        [FaultContract(typeof(ValidationFault))]
        [FaultContract(typeof(GeneralFault))]
        [FaultContract(typeof(InvalidSessionFault))]
        [FaultContract(typeof(LicensingFault))]
        [FaultContract(typeof(AccessIsDeniedFault))]
        [OperationLog]
        [OperationContract(IsTerminating = false, IsInitiating = true, IsOneWay = false, Action = "ConsultarOrdens")]
        List<DataContract.Response.OrdemResponse> ConsultarOrdens(DataContract.Request.FiltroOrdemRequest request);

        [FaultContract(typeof(BusinessFault))]
        [FaultContract(typeof(ValidationFault))]
        [FaultContract(typeof(GeneralFault))]
        [FaultContract(typeof(InvalidSessionFault))]
        [FaultContract(typeof(LicensingFault))]
        [FaultContract(typeof(AccessIsDeniedFault))]
        [OperationLog]
        [OperationContract(IsTerminating = false, IsInitiating = true, IsOneWay = false, Action = "VerificarExistenciaOrdem")]
        Sinacor.Infra.Common.Validation.ValidationResult VerificarExistenciaOrdem(DataContract.Request.ChaveOrdemRequest request);

        [FaultContract(typeof(BusinessFault))]
        [FaultContract(typeof(ValidationFault))]
        [FaultContract(typeof(GeneralFault))]
        [FaultContract(typeof(InvalidSessionFault))]
        [FaultContract(typeof(LicensingFault))]
        [FaultContract(typeof(AccessIsDeniedFault))]
        [OperationLog]
        [OperationContract(IsTerminating = false, IsInitiating = true, IsOneWay = false, Action = "ObterOrdem")]
        DataContract.Response.OrdemResponse ObterOrdem(DataContract.Request.ChaveOrdemRequest request);

        [FaultContract(typeof(BusinessFault))]
        [FaultContract(typeof(ValidationFault))]
        [FaultContract(typeof(GeneralFault))]
        [FaultContract(typeof(InvalidSessionFault))]
        [FaultContract(typeof(LicensingFault))]
        [FaultContract(typeof(AccessIsDeniedFault))]
        [OperationLog]
        [OperationContract(IsTerminating = false, IsInitiating = true, IsOneWay = false, Action = "ObterSaldoNegociavel")]
        DataContract.Response.SaldoResponse ObterSaldoNegociavel(DataContract.Request.DadosSaldoNegociavelRequest request);

        [FaultContract(typeof(BusinessFault))]
        [FaultContract(typeof(ValidationFault))]
        [FaultContract(typeof(GeneralFault))]
        [FaultContract(typeof(InvalidSessionFault))]
        [FaultContract(typeof(LicensingFault))]
        [FaultContract(typeof(AccessIsDeniedFault))]
        [OperationLog]
        [OperationContract(IsTerminating = false, IsInitiating = true, IsOneWay = false, Action = "FecharOrdemAdministradaConcorrente")]
        void FecharOrdemAdministradaConcorrente(DataContract.Request.ChaveOrdemRequest request);

        [FaultContract(typeof(BusinessFault))]
        [FaultContract(typeof(ValidationFault))]
        [FaultContract(typeof(GeneralFault))]
        [FaultContract(typeof(InvalidSessionFault))]
        [FaultContract(typeof(LicensingFault))]
        [FaultContract(typeof(AccessIsDeniedFault))]
        [OperationLog]
        [OperationContract(IsTerminating = false, IsInitiating = true, IsOneWay = false, Action = "IncluirOrdem")]
        DataContract.Response.ChaveOrdemResponse IncluirOrdem(DataContract.Request.OrdemRequest request);

        [FaultContract(typeof(BusinessFault))]
        [FaultContract(typeof(ValidationFault))]
        [FaultContract(typeof(GeneralFault))]
        [FaultContract(typeof(InvalidSessionFault))]
        [FaultContract(typeof(LicensingFault))]
        [FaultContract(typeof(AccessIsDeniedFault))]
        [OperationLog]
        [OperationContract(IsTerminating = false, IsInitiating = true, IsOneWay = false, Action = "IncluirDetalheOrdem")]
        DataContract.Response.ChaveOrdemResponse IncluirDetalheOrdem(DataContract.Request.DetalheOrdemRequest request);

        [FaultContract(typeof(BusinessFault))]
        [FaultContract(typeof(ValidationFault))]
        [FaultContract(typeof(GeneralFault))]
        [FaultContract(typeof(InvalidSessionFault))]
        [FaultContract(typeof(LicensingFault))]
        [FaultContract(typeof(AccessIsDeniedFault))]
        [OperationLog]
        [OperationContract(IsTerminating = false, IsInitiating = true, IsOneWay = false, Action = "CalcularValorOrdem")]
        DataContract.Response.ValorOrdemResponse CalcularValorOrdem(DataContract.Request.ChaveOrdemRequest request);

        [FaultContract(typeof(BusinessFault))]
        [FaultContract(typeof(ValidationFault))]
        [FaultContract(typeof(GeneralFault))]
        [FaultContract(typeof(InvalidSessionFault))]
        [FaultContract(typeof(LicensingFault))]
        [FaultContract(typeof(AccessIsDeniedFault))]
        [OperationLog]
        [OperationContract(IsTerminating = false, IsInitiating = true, IsOneWay = false, Action = "CancelarOrdem")]
        void CancelarOrdem(DataContract.Request.ChaveOrdemRequest request, DataContract.Request.JustificativaRequest justificativa);

        [FaultContract(typeof(BusinessFault))]
        [FaultContract(typeof(ValidationFault))]
        [FaultContract(typeof(GeneralFault))]
        [FaultContract(typeof(InvalidSessionFault))]
        [FaultContract(typeof(LicensingFault))]
        [FaultContract(typeof(AccessIsDeniedFault))]
        [OperationLog]
        [OperationContract(IsTerminating = false, IsInitiating = true, IsOneWay = false, Action = "CancelarDetalheOrdem")]
        void CancelarDetalheOrdem(DataContract.Request.ChaveOrdemRequest request);

        [FaultContract(typeof(BusinessFault))]
        [FaultContract(typeof(ValidationFault))]
        [FaultContract(typeof(GeneralFault))]
        [FaultContract(typeof(InvalidSessionFault))]
        [FaultContract(typeof(LicensingFault))]
        [FaultContract(typeof(AccessIsDeniedFault))]
        [OperationLog]
        [OperationContract(IsTerminating = false, IsInitiating = true, IsOneWay = false, Action = "CasarDetalhesOrdem")]
        DataContract.Response.SituacaoCasamentoResponse CasarDetalhesOrdem(DataContract.Request.ChaveOrdemRequest request);

        [FaultContract(typeof(BusinessFault))]
        [FaultContract(typeof(ValidationFault))]
        [FaultContract(typeof(GeneralFault))]
        [FaultContract(typeof(InvalidSessionFault))]
        [FaultContract(typeof(LicensingFault))]
        [FaultContract(typeof(AccessIsDeniedFault))]
        [OperationLog]
        [OperationContract(IsTerminating = false, IsInitiating = true, IsOneWay = false, Action = "AlterarOrdem")]
        void AlterarOrdem(DataContract.Request.OrdemRequest request, DataContract.Request.JustificativaRequest justificativa);

    }

}